package top.infopub.mgr.cap.dao;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.infopub.dto.cap.FinPlanSubDto;
import top.infopub.dto.cap.FinancingPlanDto;
import top.infopub.generic.GenericDao;
import top.infopub.mgr.cap.domain.FinancingPlanDomain;
import top.infopub.mgr.cap.vo.FinancingPlanVo;
import top.infopub.model.cap.FinancingInstitution;
import top.infopub.model.cap.FinancingName;
import top.infopub.model.cap.FinancingPlan;
import top.infopub.model.cap.FinancingPlanSub;

import java.util.List;

@Repository
public interface FinancingPlanDao extends GenericDao<FinancingPlan, String> {

    /**
     * 根据条件查询融资方案记录
     * @param financingPlanVo
     * @return
     * @see
     */
    Page<FinancingPlanDomain> selectByDomainWhere(FinancingPlanVo financingPlanVo);

    List<FinPlanSubDto> queryDetailFinOrgList(@Param("proCode") String proCode);

    List<FinancingName> queryListFinancingName();

    List<FinancingInstitution> queryListInstitutions(@Param("proCode") String proCode);

    void insertFinPlanSub(FinancingPlanSub fps);

    void modifyFinPlanSub(FinancingPlanSub fps);

    FinancingPlan queryByProCode(@Param("proCode") String proCode);

    FinancingPlanDto selectByProCode(@Param("proCode")String proCode);

    String selectByProCodeFlag(@Param("proCode")String proCode);
}
